Finally, figured out how to do decoding right with pointers rather than duplicating the value. Kept breaking before for some reason.