diff --git a/Text/TeXMath/MathML.hs b/Text/TeXMath/MathML.hs
--- a/Text/TeXMath/MathML.hs
+++ b/Text/TeXMath/MathML.hs
@@ -85,8 +85,8 @@
                   unode "mstyle" . unode "mfrac")
   , ("\\sqrt", unode "mroot")
   , ("\\stackrel", unode "mover" . reverse)
-  , ("\\overset", unode "mover")
-  , ("\\underset", unode "munder")
+  , ("\\overset", unode "mover" . reverse)
+  , ("\\underset", unode "munder" . reverse)
   , ("\\binom", showBinom)
   ]
 
diff --git a/Text/TeXMath/OMML.hs b/Text/TeXMath/OMML.hs
--- a/Text/TeXMath/OMML.hs
+++ b/Text/TeXMath/OMML.hs
@@ -62,12 +62,12 @@
                                    mnodeA "degHide" "on" ()
                                 , mnode "deg" y'
                                 , mnode "e" x']
-       "\\stackrel" -> mnode "limUpp" [ mnode "e" x'
-                                       , mnode "lim" y']
-       "\\overset" -> mnode "limUpp" [ mnode "e" x'
-                                     , mnode "lim" y' ]
-       "\\underset" -> mnode "limLow" [ mnode "e" x'
-                                      , mnode "lim" y' ]
+       "\\stackrel" -> mnode "limUpp" [ mnode "e" y'
+                                       , mnode "lim" x']
+       "\\overset" -> mnode "limUpp" [ mnode "e" y'
+                                     , mnode "lim" x' ]
+       "\\underset" -> mnode "limLow" [ mnode "e" y'
+                                      , mnode "lim" x' ]
        "\\binom"    -> mnode "d" [ mnode "dPr" $
                                      mnodeA "sepChr" "," ()
                                  , mnode "e" $
diff --git a/tests/stackrel.omml b/tests/stackrel.omml
--- a/tests/stackrel.omml
+++ b/tests/stackrel.omml
@@ -22,13 +22,13 @@
       <m:e>
         <m:r>
           <m:rPr />
-          <m:t>w</m:t>
+          <m:t>→</m:t>
         </m:r>
       </m:e>
       <m:lim>
         <m:r>
           <m:rPr />
-          <m:t>→</m:t>
+          <m:t>w</m:t>
         </m:r>
       </m:lim>
     </m:limUpp>
diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.6.1.4
+Version:             0.6.1.5
 Cabal-Version:       >= 1.6
 Build-type:          Custom
 Synopsis:            Conversion of LaTeX math formulas to MathML or OMML.
