Fix detection of invalid characters in player name.