BUG: Fixed crash when closing scene