ui: fix an array access derp

Fixes #1899.

r? @frank-trampe