Fixed bug in ui.coffee