Good morning fellas, I'm having a slight problem regarding brass ejection on my AR-15. I've put around 1k ammo through it as of this writing- PMC Bronze and Prvi Partizan. For the most part, it runs fine with no problems. However, sometimes the brass will get caught in the ejection port and cause a jam. Usually its not a big deal, I safe the firearm and clear it out. Although something that truly frightened me happened at the range yesterday: The 2nd round in the mag flew out the barrel and the brass case became lodged above the bolt. This has never happened before. I put the weapon on safe, removed the magazine and took out the 3rd round that was jammed along with the spent brass. I then tried to separate the upper and lower half- to no avail. The charging handle was difficult to move back and forth because of the brass. After a few minutes of thinking, and staring dumbly at my wounded boom stick, I went into my range bag and took out my trusty multi-tool. I used the pliers to yank out(for lack of a better term) the dis functioning brass case. I'm sure all you other AR owners would have cringed when you heard that sound of scratching metal, I certainly did.

I maintain the weapon pretty well- regular cleaning and oiling. Is there anything else I can do to ensure this doesn't happen again? Did I load the mags wrong? Am I just retarded? I am very concerned about this. This firearm is my SHTF go-to weapon, the last thing I want to happen is an incurable jam in a life or death situation.

Sorry for the wall of text, thanks for reading. As always, any/all input is much obliged.