fix bug caused by usernames with spaces