  		info->set_voltage = opt_avalon2_voltage_min;
  		info->set_frequency = opt_avalon2_freq_min;
  
-@@ -739,8 +860,8 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
+@@ -739,8 +864,8 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
  		memcpy(send_pkg.data, &tmp, 4);
  
  		applog(LOG_ERR, "Avalon2: Temp max: %d, Cut off temp: %d",

 	h = 0;
 	for (i = 0; i < AVA2_DEFAULT_MODULARS; i++) {
-		h += info->local_work[i];
+		h += info->enable[i] ? info->local_work[i] : 0;
 	}
 	return h * 0xffffffff;
 }
@@ -783,18 +911,11 @@ static struct api_data *avalon2_api_stats(struct cgpu_info *cgpu)
 	int i, j, a, b;
 	char buf[24];
 	double hwp;

 static void avalon2_shutdown(struct thr_info *thr)
 {
 	struct cgpu_info *avalon = thr->cgpu;
@@ -889,6 +1054,7 @@ struct device_drv avalon2_drv = {
 	.dname = "avalon2",
 	.name = "AV2",
 	.get_api_stats = avalon2_api_stats,
