  The aim of this paper is to demonstrate the effect of turbulent background
density fluctuations on flare-accelerated electron transport in the solar
corona. Using the quasi-linear approximation, we numerically simulated the
propagation of a beam of accelerated electrons from the solar corona to the
chromosphere, including the self-consistent response of the inhomogeneous
background plasma in the form of Langmuir waves. We calculated the X-ray
spectrum from these simulations using the bremsstrahlung cross-section and
fitted the footpoint spectrum using the collisional "thick-target" model, a
standard approach adopted in observational studies. We find that the
interaction of the Langmuir waves with the background electron density gradient
shifts the waves to a higher phase velocity where they then resonate with
higher velocity electrons. The consequence is that some of the electrons are
shifted to higher energies, producing more high-energy X-rays than expected if
the density inhomogeneity is not considered. We find that the level of energy
gain is strongly dependent on the initial electron beam density at higher
energy and the magnitude of the density gradient in the background plasma. The
most significant gains are for steep (soft) spectra that initially had few
electrons at higher energies. If the X-ray spectrum of the simulated footpoint
emission are fitted with the standard "thick-target" model (as is routinely
done with RHESSI observations) some simulation scenarios produce more than an
order-of-magnitude overestimate of the number of electrons $>50$keV in the
source coronal distribution.
