Fixes defaults and canonicalisation.