Fixed printing for forloops