fix bug about overflow for easy_ring_buffer