fix the bug that when updateUI the bar goes the wrong position