Fix incorrect serialization state after loading