fixing some terrain bugs