Fixed for loop problems when initilising multiple variables