Added global variable to settemp.