Fixed more bugs with cursor and begin the undo feature with sharedNotes