Worms in the stool that look like maggots are most likely pin worms, not tape worms. They are very contagious for humans, so you and anyone else in your house that handles the feces should be treated for them. Fortunately pin worm treatment is cheap and over the counter and well tolerated by almost everyone. One brand I know of is called Pin X. Don't be concerned that they are still coming after the deworming, as the other answer said, dead ones will come out, and even live ones. If, after a couple of weeks you are still seeing worms, go see your vet again and keep everyone in the house treated for the pin worms until you don't see any more in the feces and all the old feces has been cleaned up completely from the house and yard. Good luck!