fix primary key issue