more template decode offset fix