Fix loading bar bug that shows part of the bar intially green