fix primary key handling for android