Fixes to nag.py