Fuzz tester, and some fixes it found.