Fix some serialization issues.