Tom,
If you have too much metal in the pivot or too thick a shim the barrel will not fully close and you will have a gap at the top of the barrel/receiver interface. If there is a gap at the top without a shim then you need to remove a very little bit of metal from the pivot on the lug. Go really slow, it usually doesn't take much. Follow the FAQs for direction on this.
If you have no gap at the top of the barrel/receiver but have a gap on the side of the barrel and usually some sideways play in the barrel then you usually need to shim to correct this problem.
Your goal with shims and metal removal from the pivot is to have the breech end of the barrel parallel and in contact with the face of the receiver. Too much metal in the pivot area and the barrel cannot rotate all the way down and flush with the receiver face, gap at top, barrel touch receiver on sides (maybe) and bottom. Too little metal in the pivot and the barrel will rotate past lockup with the receiver face, no gap at top, gap on the sides and bottom.
One other thing to check for is that the breech face of the barrel is square, this is discussed in the FAQs. However, you must check for headspace with your ammo before trying to "square up" the breech face of the barrel as removing metal may cause headspace problems.
good luck,
BB