Fix primary key error