Fixes argument out of range for by_year_and_month posts scope