fix swap reference