Fix session serialization issues