Fuzzing, and fixes for errors found with fuzzing.