fix bad swap