Fixes in decoder