Correcting cyclical index update

for example if 2 and 4 swapped it was changing:
2 -> 4 -> 2 just changing 4 to 2 rather than swapping.
Now uses a different matrix to update.