minor changes in nreg.py