Is there any problem with the for loop?