fixed serialization handling