fixed prospect query type casting