Prototype != in TupleQuery

+bug fixes.