Could be fungus gnat larvae- there may have been eggs in the soil. The most effective gnat control methods are Mosquito Dunks (contain a bacillum that attacks the larvae, otherwise chem. free and very safe), and applying a layer of play-sand on top of your soil. You can hang yellow pest strips, but they give off a lot of chemicals; I don't use them. Once I sprayed my fluorescent tubes with Bonine plant oil and the gnats stuck to lights.