fix on the canonical function