temporal fixed the inf loop problem