Fix broken parts of mapgen