fix recv_index reset