Remove try-catch in decoder as it was causing problems with callback. Added some more debugging and fixed tests.