   "Execute a block of Ruby code with Babel.
 This function is called by `org-babel-execute-src-block'."
   (let* ((session (org-babel-arql-initiate-session
-		   (cdr (assq :session params))))
+		   (cdr (assq :session params)) params))
          (result-params (cdr (assq :result-params params)))
          (result-type (cdr (assq :result-type params)))
          (full-body (org-babel-expand-body:generic

(defun org-babel-prep-session:arql (session params)
  "Prepare SESSION according to the header arguments specified in PARAMS."
  ;; (message "params=%S" params) ;; debugging
  (let* ((session (org-babel-arql-initiate-session session))
         (var-lines (org-babel-variable-assignments:arql params)))
    (org-babel-comint-in-buffer session
      (sit-for .5) (goto-char (point-max))

      (if (org-babel-comint-buffer-livep session-buffer)
	  (progn (sit-for .25) session-buffer)
	(sit-for .5)
	(org-babel-arql-initiate-session session params)))))

(defvar org-babel-arql-eoe-indicator ":org_babel_arql_eoe"
  "String to indicate that evaluation has completed.")
