Fixed error on loop variable.