Fix bugs in nlp