Fixes a bunch of valgrind errors when decoding random junk