Fixed serialization bugs
Merge pull request #197 from wseyler/dev

Fixed serialization bugs