Fixed small bug in year assignment