fixed bug in displaying query string