added handling of reordered query parameters