Readonly primary key fix