fixed UI code