Update progressBar before changing visibility.