end_of_month bug fixed