Fix bug with last event on calendar