fixed terrain bugs