Correction of iorwf,xorwf and btg