EPA says it released 3 million gallons of contaminated water into river