bug fix for temperature and thermostat