Fix memory leak bug on HttpQuery