fixed some errors

fixed json data parsing issue

TODO: fix memory allocation issue on high traffic search terms