fix swap