fix output cleaning