Fixed bug where undo/redo did not work for sorted...

column for replace - id was wrong.