Fixes index out of bounds exception when space is after @ in trimmed display name.