Fixed a bug when editing years