Fixed a couple of issues found setting up test cases for the AFL fuzzer