Fix ring buffer definition