   "Remove the overlay at point."
   (interactive)
   (when emc-cursor-list
-    (setq emc-cursor-list (remove-if (lambda (overlay) (eq (overlay-start overlay) (point)))
-                                     emc-cursor-list)))
+    (setq emc-cursor-list
+          (remove-if (lambda (cursor)
+                       (let ((overlay (emc-get-cursor-overlay cursor)))
+                         (eq (overlay-start overlay) (point))))
+                     emc-cursor-list)))
   (remove-overlays (point) (1+ (point))))
 
 (defun emc-remove-cursor-at-point ()

;;           (t (emc-make-region-overlay (point) (1+ (point)))))))

;; ((and (eq mark orig) (< (point) mark)) (setq mark (1+ mark)))

(defun emc-refresh-region (region orig)
  "Refresh the visual REGION when point moved from ORIG to current location."


(defun emc-make-cursor-and-goto-next-match ()
  "Create a cursor at point and go to next match if any."
  (let ((cursor (emc-draw-cursor-at-point)))
    (evil-exit-visual-state)
    (if (emc-goto-next-match (emc-get-pattern) 'forward)
        (emc-add-cursor cursor)
