ui: fix var scope (refs #56)