Fixing a few bugs in #8, fixes #7
Version bump v0.2.2