fix digest size bug