Fixed problem with progress bar not closing when done