Fixed the conflicting loop variables in mainsite setup