Added test. Fixes #21