fix for calendar bug