fixed bug in json pair preprocessing