Minor change to loop condition