Fixes #94 and adds a test.