Trying to replace light in ceiling. In the junction box there are two white, three black wires, 1 red and the ground. Hooked up whites to whites, blacks to blacks, and capped off red. Light worked but won't switch off. Then connected red to the blacks and it keeps throwing the breaker. What am I supposed to do with that red