fixed infinite loop issue.