Small fixes to serialization and operations