Fix matrix transformation formula closes #2