fix swapping pairings