Fix bug in splitting by year