Fix a few lingering bugs.