added line to properly destroy window after closing game