Found a sane solution for buffer switching