Added serialization fixes