fix temp handling