fixed digest problems for $apply