fix bugs on ui.showMessage