Now works correctly if there are 2 or more dates with the same max income