Fix bug when updating first_valid_year value