actually reuse buffers properly for correct inversions