Fixed problem with type canonicalization