Fix another issues in json/query for Sdb