Fixed some bugs while refreshing UI and updating adapters