Added close event before closing the window
Merge pull request #92 from ChanKaur/chan

Added close event before closing the window