Fixes monthsToKeep in deleteOldData