Partially fixes a bug introduced in #18
Merge pull request #22 from eric-wieser/patch-1

Partially fixes a bug introduced in #18