Changes to fix serialization