Fixes to cmdline.py