Fix getIdentities() bug