In the future prior to dosing chemicals you might want to try waiting until the tank has been dark for a couple of hours. Then place a flashlight shining on a front corner. The flatworms are photosynthetic and will be attracted to the light. Then you just suck them out with a siphon hose.