More minor code fixes from comments in pull request #1736.