Fix the query string handling.