I had a similar problem and resolved it by removing the square cover on top of the MAF and re-soldering the connector/pins. I did this after replacing one MAF and it working for awhile until the car started to surge.
Basically what you are going to do is carefully remove the silicone bead around the square top. Once this is done, lift the top off and you should see a sheet of copper. Gently lift the copper up to expose the connectors that touch the pins. You may find that one or more have cracked solder joints. Get your solder iron and solder out and re-solder each connection. Push the copper down, put the square top back on and run a bead of clear or whatever color silicone you have on hand to seal the top in place.
Re-install in the car and you should be good to go with no more problems.
Good luck.
P.S. here is the link to the thread that I used but for some reason the pictures are not available anymore,
zerothread?id=131893