fixed wrong object serialization