Fix values and values_xxx query handlers