Changed to adapt to changes to SWAP library