Fix deserialization bug
Merge pull request #1038 from andrerod/dev

Fix deserialization bug