Bug fix in temperature scanning