Fixed the level generation bug