Clomid and miscarriage

Has anyone used clomid and had a miscarriage? Is it common? I used one cycle of clomid and got pregnant idk if it actually worked or just luck but then had a miscarriage at 15 wks baby stopped growing at 12...