       (when (and (profile-current-get 'on-profile-init)
                  (fboundp (intern-soft
                            (profile-current-get 'on-profile-init))))
-        (profile-current-funcall 'on-profile-init root))
-      (profile-current-put 'profile-inited t))))
+        (profile-current-funcall 'on-profile-init root)))))
 
 ;; override the advice from `profiles.el'
 (defadvice find-file-noselect-1

    (when (and profile-current
               (not (profile-current-get 'profile-inited t)))
      ;; run this init code once per profile loaded
      (when remote-host
        (profile-current-put 'remote-host remote-host))
      (when remote-prefix

          (profile-set-grep-dirs name)
          (profile-set-mode-line-from-include-files name)
          (profile-set-sml-and-registers-from-build-sub-dirs name)
          (bmkp-switch-bookmark-file-create
           (concat
            (profile-get name 'remote-prefix)
            (profile-get name 'project-root-dir)
            "repo.bmk") t)
          )
      ('profile-error-non-fatal
       (profile-put name 'profile-inited nil)
       (message "Stopped loading profile \"%s\" (%s)" name (cdr err)))
      ((profile-error-aborted profile-error)
       (ignore-errors
         (profile-put name 'profile-inited nil))
       (error (cdr err)))
    )))

;;;###autoload
