Fix bugginess with progress bar + clean up