fix selector state variable no more used twice