Fix for issue #134

There was a bug in the transpose of the indices. Added a test.