fix output script