Fixed multiple bugs in the UI