Fix a few minor bugs in previous commits.