fix the serialization issues