Closes #27

And adds a test for that case.