fixed resend bug