Error check improved. Disable undo added.