Bug fix for methods get_query_json and get_results_json