Minor fixes to prim key