fix bug and modify for auto resend