fix ring->tail ptr