fix digest looping