fixed bug in getname