bug fix for calendar