Fixed bug which causes the calendar to open on resize