Merge pull request #973 from sgraham/canonicalize-fix