Fixes to some minor issues raised by @lordnull.