Bugfix for doublette removal