fixed terrain edges and obscure physics bug