fixed stuff on serialization