fixed canSwap