Switching buffers dynamically