bugfix: application crashes after exit the game