Typically, on a new rifle that malfunctions and fires upon release of the trigger, it is due to an incorrectly installed disconnect spring, and less common, from out-of-spec lower parts. With the trigger at the rest position, and the hammer pushed back until the sears are at their closest position, there should be a gap between 0.001" to 0.003", no more. If the distance is greater, and the lower parts are within verified tolerances, than an out-of-spec receiver with poor pin hole placement is considered as the culprit. If this is the case, then replacing lower parts may temporarily alleviate the symptoms of this issue, but the malfunction will ultimately return. Measuring these components and verifying critical dimensions, as well as verifying that they are within specification by evaluating their functional relationship with one another, is important when attempting to troubleshoot an issue like this.