logic fix for past month updates