fix resending buf_len