fix attenuation value

fix index and increment value