Fix bug with database lookup for digest generation.