Use save-excursion for restoring cursor