Mat4 bug fixes