fix canonicalized_resource bug.