Fixed error with document id and stemming empty terms.