fixed bug related to invalid api.json_request call