Fixed bug in lastMonthDate method