Mopar dies when key is released

I had the same problem on my Dart when i fire up it would start while i had the key in the cranking mode once i release the key it would die out,i thought it was the ignition barrel,replaced and still the same problem so while my son cranked the engine i started to jiggle the wires on that block which is mounted on the fire wall bang fired straight away.Shut her down and remove connectors and cleaned with some brake cleaner and i haven't had any problems since.And before this happened i was driving and it back fired than run for a short period of time than cut out again,i thought it was fuel related the way it was behaving like it had a lack of power and it did this for about 10 k than died out.