The only thing i can think of is you got a dead short somewhere. What you gotta do is get a wiring diagram and a multimetre and start looking for any bad connections. Some how, it is causing your car to turn off via the brake lamp switch. Odd but give it a try.