 (defvar *host-regexp* "^https?://\\([^/]+\\)/")
 
 (defun start-connect-is (desc)
+  (setq *inside-connect-is* t)
   (with-current-buffer "*common-lisp*"
     (when (and (fi::ensure-lep-connection)
 	       (fi:eval-in-lisp "(cl:if (cl:fboundp 'http-utils::declare-additional-log-stream) t nil)"))

		      (write-region (point-min) (point-max) file))
		    (setq *script-compilation-mode* :remote)
		    (fi:start-interface-via-file host "*common-lisp*" file)
		    (with-current-buffer "*common-lisp*"
		      (setq-local *inside-connect-is* t))
		    (start-connect-is url))
		   (t
		    (message "There was an error connecting to the Intranet server")))))

	  (write-region (point-min) (point-max) file)
	  (setq *script-compilation-mode* :remote)
	  (fi:start-interface-via-file host "*common-lisp*" file))
	(start-connect-is (format "server %s port %s" host port))
	(delete-file file)	
	(kill-buffer buf)))))
