fixed a bug in ProgressBar elapsed time calculation