Various fixes

See individual commits:
* Found two problems with recent check-ins and corrected them
* One minor improvement