If you saw tapes, that is something that requires a specific med. My vet depends on me to see them because they do not show up on a fecal that shows the eggs of other worms.
Tapes can come from ingesting a flea, and it's possible the shelter did not SEE the tapes, so didn't give med for it.