Even using the stock tune, there shouldn't be an Air/Fuel imbalance after installing headers. This code is most likely thrown from an exhaust leak somewhere between the header and cylinder head or header and Xpipe connection. If there's even a small leak at these points, you'll get this code. Also, a p0300 is from a random misfire. This again can be cause from an Air or Exhaust leak.
I would have the exhaust double checked for leaks before doing anything. Purchasing a Bama tune will NOT fix this issue, since it's a mechanical problem.
Again, have a shop smoke test the engine and exhaust. There's most likely a leak somewhere!