fix output of redirect