Get your exhaust fixed. Drive to a muffler shop and get it welded up or repaired. The o2 sensor can't work correctly if exhaust is escaping and fresh air is being let in.. Sensor is getting incorrect readings, sending that to the ECU, and the ecu is sending the wrong signals to your injectors and ignition causing the missfires.