changes to fix serialization errors