small tweaks to decoder