bug fix in looking for existing attribs index