fix bug when username is empty