fixed loadingBar change direction affect position issue