Fixed decoder and unit test.