debug average issue