fixed primary key value error when primary value provided in data array