got decoder test passing, fixing memory leak