Fix ring-buffer variable updating on read.