fixed duplicate cid issue