Matrix multiplication gives the proper result now. Resolves #2