fixes to allow queries results to be saved in the object database