  Synchrotron emission is believed to be a major radiation mechanism during
gamma-ray bursts' (GRBs) prompt emission phase. A significant drawback of this
assumption is that the theoretical predicted spectrum, calculated within the
framework of the ``internal shocks'' scenario using the standard assumption
that the magnetic field maintains a steady value throughout the shocked region,
leads to a slope F_\nu \propto \nu^{-1/2} below 100 keV, which is in
contradiction to the much harder spectra observed. This is due to the electrons
cooling time being much shorter than the dynamical time. In order to overcome
this problem, we propose here that the magnetic field created by the internal
shocks decays on a length scale much shorter than the comoving width of the
plasma. We show that under this assumption synchrotron radiation can reproduce
the observed prompt emission spectra of the majority of the bursts. We
calculate the required decay length of the magnetic field, and find it to be
\~10^4 - 10^5 cm (equivalent to 10^5 - 10^6 skin depths), much shorter than the
characteristic comoving width of the plasma, ~3*10^{9} cm. We implement our
model to the case of GRB050820A, where a break at <~ 4 keV was observed, and
show that this break can be explained by synchrotron self absorption. We
discuss the consequences of the small scale magnetic field scenario on current
models of magnetic field generation in shock waves.
