Fix inverse matrix transformation