Most likely cause of fuel gauge being inaccurate?

I just went through this and it is frustrating. I first verified that my gauge was still working correctly using a home made tester that shows full, 1/2 and empty. Next I verified a good ground at the sender. Then I traced the gauge wire back to the dash. There was a connector behind the kickpanel that needed cleaned.Finally I checked the ground at the dash. The nuts had worked loose over the years so I tightened them down.

My gauge is now pretty close whereas before on a full tank it showed about 3/4. It was probably a combo of everything I checked but the ground being clean and tight is a must.