Fixed deserialization of query results.