Fixed printing for query strings and some other small printing changes