fixed get logic in circular_buffer