Fixed crash on world generation

We should look at finding out what the intention was here and make it
work properly in the future