Added empty check for progress bar value