fix swap on MacOS