Proper query string manipulation