oops, forgot to correctly cycle the buffer