Fixed opening the select barrier UI causing a crash.

_index is definined through the `for "_index" from to do`-loop