Another fix for calendar functions