Fixed serialization
Merge pull request #345 from sylvaindeloux/master

Fixed serialization