fixed a bug in the level generator