Fixed bug on calendar selection