fix terrain bug