Fixed nasty bug during heightmap construction