Prevent progressbar from breaking at the end of the script