fixed some serialization problems