Hanlde multiple clicks on close button. Closes #25