Fix incorrect progress calculation.