Fixed swapName bug