Fixed primary key problem