Correct all of the grammatical flaws in the given sentence.
Among all the reasons of the explosion, there were three main causes, which led to the function failure of the nuclear power plant.
Among all the reasons for the explosion, there were three main causes that led to the function failure of the nuclear power plant.