fix the discrepancy between words register and inverted index