fix broken algo on empty database
Merge branch 'master' of github.com:medialab/Hypertext-Corpus-Initiative