Fixed bug querying non-nodes

Fixed a bug causing the returned type to only be a set of nodes, leaving out any attributes or values.