fixed the infinite loop because of the last commit.