Fixing endfor