Fix bug with changing year and month