Fix progress API and add tests