You might have gotten the Fungus Gnats from the soil.
The Maggots in your soil will eat organic material, including your root system.
I agree a good soil drench should do the trick.
In the future I would use a preventative measure.
Encapsulating the soil in Perlite is my Favorite method.
Like the sand, they won't crawl through the perlite.
The Perlite also helps keep moisture in the soil.
Good Luck on Your Grow.