made user name resolution more robust