Modified the response in UndoCommand to use the static method cannotExecuteCommand