fix some lingering bugs.