Fixed thermal guard enable and updated code

Signed-off-by: Suyash Srijan