Prevented unnecessary buffer swapping.