fix swap type