fixed some skipping issues after calling ringbuffer's clearbuffer