Fixes #7.

That small change did indeed fix this issue. Thanks! I added a test case as well.