fixed infinite loop issue.
renamed variable to make it more evident on purpose.