Added logic to permit swapping cursors