Fixed attenuation error and style_id in grain_by_percent