Invert swap and remove variables so they are now correct