fix detecting json query