This started as a patch to fix a simple bug in the 'x' command, but then I tacked on a minor cleanup I saw when working here. Regression tested by the buildbot. Tom