fix for trailing average on ring buffer