fixed issue in add where a new item could have the same idAttr and still be added to the array