Fixed issue with query parameters not being used