I have been trying to place two figures that span half a column side-by-side. The two figures have their own captions. I used the minipage command and the figures did appear side by side, but their captions overlapped (the captions are sorta long, cf. the attached pic). How do I separate the captions? Please help me figure this out! Thanks

The tex code is as follows:
Code: Select all
\begin{figure}
\centering
\begin{minipage}{.5\columnwidth}
\centering
\includegraphics[width=\columnwidth]{optimality}
\captionof{figure}{Average system cost of all schemes under different $V$ values}
\label{fig:optimality}
\end{minipage}%
\begin{minipage}{.5\columnwidth}
\centering
\includegraphics[width=\columnwidth]{energycost}
\captionof{figure}{Average energy cost and carbon footprints under different $V$ values}
\label{fig:energycost}
\end{minipage}
\end{figure}