Bug fix for calendar view