M4a1 gen 9Safety not working

Just recently swapped form the polycarbonate gearbox shell to the nylon shell and had to swap all the internals over. Including trigger assembly and fire selector. After putting it back to gather I can now pull the trigger in when the safety is on. And semi doesn’t work properly. All the part are in nothing left on the work bench. If anyone has tips on how to fix this that would be great.