Closing window on cancel button