Fix a bug in username handling.