Switching buffers bugfix.