Fix serialization/deserialization mixup
Merge pull request #6 from thusoy/patch-2

Fix serialization/deserialization mixup