fix spec from query encoder