fix primary key error