Fix queryType closure usage