1. Fixed some state serialization issues