Remove uninitialized variable
Fix a bunch of serialization issues