Fix bugs in nneval.