Fixed: Error thrown on undo caused by Drupal's dialog system.