Fixed a warning with a for loop