fix bug in addId