Fix query string paramter handling in test environment