Fixed Issue #2: calendar not closing after adding event.