Fix a bug or two.