Fixed a bug introduced yesterday

The commit yesterday fixed the issue for some datasets, but screwed up
the transform calculation for others (as discovered today). This edit, which corrects the stdCoords array, has been tested to work on a few different datasets. As always, more
testing is needed...