diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index 01106c3..f9094a1 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -652,9 +652,8 @@ publishing directory."
       (if (or (not (equal (char-before) ?\n))
 	      (not (equal (char-before (1- (point))) ?\n)))
 	  (insert "\n"))
-      (setq char (or (nth (max (- umax level) 0)
-			  (reverse org-export-ascii-underline))
-		     (last org-export-ascii-underline)))	    
+      (setq char (or (nth (- level 1) org-export-ascii-underline)
+		     (car (last org-export-ascii-underline))))
       (unless org-export-with-tags
 	(if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
 	    (setq title (replace-match "" t t title))))
