Fixed some bugs that happened due to changing the ui