Bug fix for serialization
0.2.2