update progress correctly