Fixed serialization
Merge pull request #498 from sylvaindeloux/master

Fixed serialization