fix handling of indexes. didn't matter on desktop but affects logic of mobile dropdowns