remove duplicates, fixes #187