Fixed Progress Bar Bug

Fixed progress bar bug. Should've calculated the percentage later in the code.