Fixed loop issue.