This problem is solved by adjusting the phase of the driving electric field to more strongly add energy and mass to electrons at the trailing end of the bunch. This is called negative energy chirp, meaning the energy decreases along the direction of beam travel. Because the beam is traveling at almost the speed of light, the trailing electrons gain mass, rather than velocity. This results in a correlation between mass and position in the bunch.