fixed name handling bug