I would advise adding a note here that this will miss the case when the old value was the max, but is no longer the max.