addAttr bug fixed