Fixed bug in attenuate fluxes