Fixed bug in the month functions