restoring correct argmax