fixing bug from last commit. querySpec is not available on cursor