Fix progressbar and track time when hitting the stop button.