There are two possibilities. You may have had a chemical abortion
and so the positive pregnancy
tests earlier could not show normal hCG
levels. The sonogram sometimes fails to resolve the findings owing to poor resolution of an early pregnancy; a repeat scan after a week can be more descriptive. Serum beta-hCG measurements should be serial so as to know the changes in the state of pregnancy and corroborated with sonogram findings to know the prognosis. Consult your doctor for further suggestions. Good luck.