fix weird serialization crash