fix progress computation