fix primary keys