fix swap direction