Fixes a bug when using the default display name during registration.