fix some serialization issues