Adding query string check