Fix problems with UI caused by refactoring