Solved a stupid bug in calendarController