dungeon end check fixed - now works perfectly