loosen off the stem bolts then tighten up the top cap/bolt. don't over tighten it though just enough to make it tight, then test for movement in the headset.....should be free of movement, if not then the bearings maybe shot or there's not enough spacers under the stem.....the fork stearer tube should be about 5mm under the top of the stem.
If there's no movement in the bearings then do up the stem bolts and job done.
make sure the stem bolts are loose when tightening up the top cap else it's not going to tighten up any slack in the headset.