fixing primary keys