Swap length/capacity