Fix to canonical URI generation