Bug fix in calls to __setstate__
Merge pull request #42 from joachimmetz/master

Bug fix in calls to __setstate__