Fix a pair of minor bugs.