       (tern-go-to-position file pos))))
 
 (defun tern-go-to-position (file pos)
-  (find-file (concat tern-project-dir file))
+  (find-file file)
   (goto-char (min pos (point-max))))
 
 ;; Mode plumbing

                                (setf tern-last-argument-hints (cons opening-paren type))
                                (tern-show-argument-hints))))
                          `((type . "type")
                            (file . ,(tern-local-filepath))
                            (end . ,(1- opening-paren))
                            (preferFunction . t))
                          t)))))

(defun tern-find-definition ()
  (interactive)
  (tern-run-request (lambda (data)
                      (push (cons (buffer-file-name) (point)) tern-find-definition-stack)
                      (let ((too-long (nthcdr 20 tern-find-definition-stack)))
                        (when too-long (setf (cdr too-long) nil)))
                      (tern-go-to-position (concat (tern-project-dir) (cdr (assoc 'file data)))
                                           (1+ (cdr (assoc 'start data)))))
                    `((type . "definition")
                      (file . ,(tern-project-relative-file))
                      (end . ,(1- (point))))))

(defun tern-pop-find-definition ()
