speed_avg fixes but need more worckaround