I placed 2 figures side by side using the minipage method from this post, and the figures look perfectly fine. However, the caption of the right figure stick out into the margin, why is that and how can I fix it?

My code is like this:
\begin{figure}[htbp]
\centering
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=6.6cm]{figure1.png}
\caption{Caption for figure 1.}
\label{fig:fig1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=6.6cm]{figure2.png}
\caption{Caption for figure 2, but longer.}
\label{fig:fig2}
\end{minipage}
\end{figure}


subcaptionpackage along with a subfigure? – Mario S. E. Apr 30 '13 at 09:24graphicxpackage either. I need to look into the template or maybe it simply doesn't allow me to put them side by side. – LWZ Apr 30 '13 at 18:22