# Using an expression with subscript with overset command

I have the following document. As you see after compiling, the subscript b is almost lies on the arrow. It should be upper. What are the way to fix it. An alternative solution is also welcomed.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$X\overset{f_b}{\rightarrow}Y$
\end{document}

• I'd use the \xrightarow command from the mathtools package. – user121799 Jan 11 '18 at 13:37
• \xrightarrow is also part of amsmath: $X\xrightarrow{f_b}Y$ – Steven B. Segletes Jan 11 '18 at 13:42

Here is an alternative solution: use the \xrightarrow command. (Thanks to egreg and Steven B. Segletes.)
\documentclass{article}
$X\xrightarrow{f_b}Y$