Fix a couple bugs.