fix (de)serialization incompatibility with multiple sessions