Bug fix when THM is not detected