Remove bug in structure list

The function in charge to return the names of the structures and to
filter them was buggy. Each structure coud appear t-several times. I
fixed it.