Fixes to new decoder code
Merge remote-tracking branch 'origin/master'