small cleanups in ring buffer