Fix update's condition