fix serialization problems