   (let ((start-point nil)
 		(snippet (car (cddddr
 					   (assoc selected-candidate
-							  node-ac-complete-info)))))
+							  node-ac-completion-table)))))
 	(unless (string= "" snippet)  ;; Only continue when a snippet is returned
 	  ;; Get the point where the syntax of the candidate starts
 	  (save-excursion

				   (node-ac-evaluated-syntax-is-prefix-of-current-syntax)))  ;; Matches syntax under cursor
	  ;; Parse result
	  (setq node-ac-evaluated-syntax node-ac-evaluating-syntax)
	  (unless (string= "\n" (buffer-string))  ;; No completion found
		(setq node-ac-complete-info
			  (mapcar (lambda(elem) (split-string elem ">~<"))
					  (split-string (node-ac-buffer-substring 1 (1- (point))) "~~<")))))
	
	;; (unless node-ac-complete-info
	;;   (message (buffer-string)))  ;; On error, output the buffer string
	(setq node-ac-evaluating-syntax nil)
  	(kill-buffer node-ac-output-buffer-name))
  
  ;; Invoke auto complete
  (if (and node-ac-complete-info
		   (current-idle-time))
	  (ac-complete-node)
  	(unless (or (string= event "killed: 9\n")
				(string= event "finished\n"))
  	  ;; Unsuccessful but not killed or empty. Retry
  	  (node-ac-complete))))

;;; Yasnippet insertion on function complete
(defun node-ac-expand-snippet (selected-candidate)

(defcustom node-ac-doc-min-width 20
  "The min-width of the document strings for each line")

(defcustom node-ac-completion-delay 0.25
  "The delay sections before sending completion request to node.js.")


;;; Private variables

