# Subfigure numeration inside the section [duplicate]

Possible Duplicate:
Numbers of figure references

I'm having some problem about subfigure numeration. The figures in my work are numbered inside the section using the line \numberwithin{figure}{section}, so they are like figure 2.1, 2.2, 2.3...

I tried to use the subfigure command and make reference to that figure, so the numeration should be 2.1(a), but it ignores the section number, showing just "figure 1(a)".

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{subfigure}
\numberwithin{figure}{section}
\begin{document}

\begin{figure}
\subfigure[subfigure a]{\includegraphics{image1} \label{image1}}
\subfigure[subfigure b]{\includegraphics{image2} \label{image2}}
\end{figure}

According to figure \ref{image1} we ...
\end{document}

Is that a way I could use this kind of numeration and the subfigure command?

If I remove the line \numberwithin{figure}{section} the numeration is fine

-