Fixed 'null' being inserted in querystring when original query is missing.