Fixed some serialization issues.