Variable List Is Not Updated Inside Loop