Optimize the progress bar control