Fixed infinite loop

Also fixed minimum dungeon area; section that caused infinite loop needs
to be altered more in the future.