Correct get temperature function

Refs #10409