Load a single round in the mag, charge the round, fire the round with the empty mag still in the well, and tell us if the bolt is locking back on the bolt catch (catch in front of the bolt, and not just on the bottom of the carrier).
If the bolt does not lock back, then you have a gas/binding/over spring-buffer over mass/ or wedging problem that needs to be resolved.
If the bolt locks back, then the cycle is fine, and just a matter of figuring out why the less then ideal ejection path instead.
First could be that the ejector is loosing the grip on the spent case rim on the pull, and this would cause the week ejection. Here, just adding a # 60 O-ring around the extractor spring will increase the extractor tension to make sure that the spend case is not dropped by the ejector in the pull.
Second could be that the ejector is binding in the bolt face, and this is easy enough to check by just hooking a spent case on the extractor, and cam'g the ejector in a few times to the bolt face channel to check for it binding in the bolt face channel.
Third on the list, pull all the way back on the charging handle, and see where the face of the bolt stops against the back of the ejection port. The face of the bolt should stop about 1/8" to 1/4" in front of the back of ejection port window back edge. If the bolt face is even with, or retracting back past the back of the ejection port window, them pull the buffer and recoil spring, and start dropping in quarters as bottom of tube shims so the bolt face does stop in the correct position of the ejection port window.
Note, when the bolt retracts back too far, the spent cases tag the back of the window edge, and this causes a great deal of problem.
So on that note, is the stoke fine to begin with (will lock the action back after the last round fired) or not.