Swap checkbox and fix swap bug