BUG FIX: fix problem generating digest when use_preview is true
Merge pull request #5 from caffo/fix_digest

BUG FIX: fix problem generating digest when use_preview is true