fix output bug