restored correct argmax