Also, have you wormed the adults you're breeding from?
Many, I'd go so far as to say most livebearers - bought from fish stores have been mass produced in fish farms, and are carrying worm burdens. Adults can carry worms without showing many ill effects for a long time, but the fry they produce are then exposed to the worms (even if the fry are moved, since the worm eggs can be transferred by decor/hands/water) and the fry are much less able to handle the worm load, affecting their development and increasing the mortality rate.
I would worm all your tanks if you plan to keep breeding. The water quality was your main problem here, I'm sure, but I now worm any livebearers I bring in before they go near my main tanks. Once you've battled worms, you're much more cautious!