thermostat bug fix