Updates the progress function

Because the previous one was wrong.