Engine leaning out at 3000rpm

I had back firing through my exhaust. Turned out to be one plug wire terminal was corroded. Don't know why. I fixed the terminal and problem solved.