fixed bug about row-major ordering in UV matrix creations