fix bug in finding names