fixed matrix order, potential small bug in view matrix