Fixes primary keys