Whenever you upgrade your gun's capacity it fills the weapon with ammo. So don't reload before you buy the upgrade. This works great with weapons that have very little ammo (such as the magnum revolver 'Broken Butterfly'); after you use up the gun's magazine, simply look for the merchant and upgrade the ammo capacity.