some tweaks to decoder