calling distinct on getSelectedIndices result -> it returns the same index several times