make windows 'X' button properly close program