some serialization fixes for query system