fix problem where username is sometimes null