Miscarriage

So i had an early miscarriage it was confirmed by a dr. I was bleeding since july 14th (heavy). I did have big clots and small clots since i started bleeding. It all eased up july 27th i was spotting a small amount. I went to the drs wednesday(july29) she did a pelvic exam. Everything looked good. She wasn't worried about an infection. She told me the bleeding should be gone by this weekend. So i woke up this morning (july31) and the spotting was gone and i wasnt bleeding anymore. Now (few hrs later) i start pouring blood again, heavy bright red blood and another clot comes out. So randomly. Why would this be happening? Ive been small spotting for like 4-5 days now and then it starts back pouring out of me randomly.