Fix SWAP detection