fixed the GUID and objectSID canonicalisation functions