Fix the way identities are handled