fix g_avg