fix POW code generation