Did you actually watch Terminator 2?
John Connor (from the future) re-programmed the T-800 to protect his past self.
And his past self befriended the T-800.
The problem isn't the AI.
If AI does go rouge, it is because it was either poorly designed, or we have failed as a species.