Bugfix/uniqueness

Fixes #74 and adds a test to prevent regression