  		get_work(thr, thr->id); /* Make sure pool is ready */
  
  		pool = current_pool();
- 		if (!pool->has_stratum)
- 			quit(1, "Avalon2: Miner Manager have to use stratum pool");
--		if (pool->coinbase_len > AVA2_P_COINBASE_SIZE)
--			quit(1, "Avalon2: Miner Manager pool coinbase length have to less then %d", AVA2_P_COINBASE_SIZE);
--		if (pool->merkles > AVA2_P_MERKLES_COUNT)
--			quit(1, "Avalon2: Miner Manager merkles have to less then %d", AVA2_P_MERKLES_COUNT);
-+		if (pool->coinbase_len > AVA2_P_COINBASE_SIZE) {
-+			applog(LOG_ERR, "Avalon2: Miner Manager pool coinbase length have to less then %d", AVA2_P_COINBASE_SIZE);
-+			return 0;
-+		}
-+		if (pool->merkles > AVA2_P_MERKLES_COUNT) {
-+			applog(LOG_ERR, "Avalon2: Miner Manager merkles have to less then %d", AVA2_P_MERKLES_COUNT);
-+			return 0;
-+		}
+@@ -720,15 +845,15 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
+ 			return 0;
+ 		}
  
 -		info->diff = (int)pool->swork.diff - 1;
 +		cgtime(&info->last_stratum);

 		info->set_voltage = opt_avalon2_voltage_min;
 		info->set_frequency = opt_avalon2_freq_min;
 
@@ -719,7 +863,12 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
 		tmp = be32toh(info->fan_pwm);
 		memcpy(send_pkg.data, &tmp, 4);
 
-		tmp = encode_voltage(info->set_voltage);
+		applog(LOG_ERR, "Avalon2: Temp max: %d, Cut off temp: %d",
+		       get_current_temp_max(info), opt_avalon2_overheat);
+		if (get_current_temp_max(info) >= opt_avalon2_overheat)
+			tmp = encode_voltage(0);
+		else
+			tmp = encode_voltage(info->set_voltage);
 		tmp = be32toh(tmp);
 		memcpy(send_pkg.data + 4, &tmp, 4);
 
@@ -740,14 +889,21 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
 		avalon2_init_pkg(&send_pkg, AVA2_P_SET, 1, 1);
 		while (avalon2_send_pkg(info->fd, &send_pkg, thr) != AVA2_SEND_OK)
 			;

 #define AVA2_DEFAULT_FREQUENCY_MIN	300
 #define AVA2_DEFAULT_FREQUENCY_MAX	2000
 
-#define AVALON2_TEMP_OVERHEAT	88
+/* Avalon2 default values */
+#define AVA2_DEFAULT_MINERS	10
+#define AVA2_DEFAULT_VOLTAGE	10000 /* v * 10000 */
