Fix for when using query string