Fix division by zero bug in progress bar