Fixes #94 and adds a test.

This line seems to be duplicated...