Fixed bug in temperature regulator