Fixed reference error in ui.js