Bug fix on calendar