fix digest/apply issues