Fix and operation which in some cases for equal keys