If you buy several ammo crates for a gun and store the gun in your inventory the gun loses its ammo. A good way to fix this is to allow ammo to be kept into your inventory, that way if you ever run out you can just grab some directly out of there. Ammo is inexpensive for this reason but id much rather buy ammo in bulk to keep in my inventory in emergencies then having to constantly go back to the f4 menu to buy more rifle/shotgun/pistol/special ammo.