Problems with displaying ForLoop

@russian-dima Thanks for all your very helpful tips! These helped a lot and now I am running my code problem-free. Two thumbs up from me.