NON-WORKING! Some fixes to serialization.