fix to use local matrix rather than global matrix for transforms