fixed small errors in genterrain and terrain render