fix random dungeon algorthm