Rewrote logic for forward_read_buffer.