Fixed bug with terrain.