fixed $digest bug