Fixed progress bar code to close on 100%