Change for loop to use a size_t instead of int.