Fixed terrain bug