Fixed bug in lexical weighting