Fix a couple of minor issues noticed by Robert Frewell.
Merge remote-tracking branch 'upstream/master'