Another attempt to correct multiple thermostat bug