bug fixes for the previous ui refactoring