Changes to deal with serialization