Bob was the great grandson of our founder and worked at Fluor for 42 years before retiring in 2009.
For 27 years, he led the Fluor Foundation, our charitable and community involvement organization that was established by his father and his uncle Si Fluor in 1952.
In mining, work is tracking broadly to our expectations for the next 18 months.
Backlog for mining declined by approximately $1 billion in the quarter.
Last week, we were notified by TxDOT that our co-lead joint venture was selected to design, construct and maintain the 6.5-mile long I-35E Phase two project here in Dallas.
Regarding our legacy infrastructure portfolio, I want to provide an update on the Gordie Howe Bridge Project and the $138 million charge we announced today.
Design is essentially complete, and we have procured approximately 85% of the materials required.
We have been revising the forecast along the way, and this contract was previously included in our 0 margin projects in backlog.
We have just under $1 billion in backlog remaining for this project and anticipate substantial completion by the end of 2024.
In June, we fully demobilized our people and successfully completed our assignment in Afghanistan after 13 years.
At its peak, Fluor had 26,000 employees from 65 countries, speaking 39 languages at 76 sites and supporting over 100,000 troops.
This included 191,000 meals prepared per day and the establishment of the first-ever biodiesel program for the U.S. military deployed overseas.
Under this program, we produced over 0.5 million gallons of fuels for the bases.
These positive segment margin results were partially offset by a $20 million loss recognized on an embedded derivative, which is excluded from our adjusted earnings per share numbers.
This program started in January 2020 and included the installation of nearly 6,500 piles.
If laid end to end, the piles would extend 130 miles.
These pieces of equipment for Train one include the 345 ton, 50-meter-long main cryogenic heat exchanger and two precooler units, each weighing over 280 tons.
Fluor is relying on its 50 years at the forefront of the gasification industry and has executed more than 30 pre-FEED and FEED projects.
For the first seven months of this year, NuScale has received $192 million in outside investments from JGC and GS Energy, Doosan, Samsung and IHI, among others.
We are currently working on or have recently completed pre-EPC work that represents over $150 billion in total installed costs.
Additionally, we are pursuing another 200 study in FEED projects, representing almost $200 billion in TIC over the next several years.
So while we are seeing some near-term headwinds in 2021 with new word lumpiness, we have considerable opportunity to capture projects that are in the pipeline, and they're well suited for Fluor.
For the second quarter of 2021, we are reporting a diluted adjusted earnings per share amount of $0.32.
Our diluted share count was $156 million for the quarter, up from $140 million in the first quarter.
In the third quarter, we expect our diluted share count to be approximately $170 million, as the effects of the issuance will be for a full quarter.
With the expected debt retirement, our debt to total capitalization ratio will decline to below 40% by year-end, fulfilling the goal that we set on Strategy Day.
Since completing the offer, we have retired $26 million in debt, to date, and anticipate additional substantial retirements by the end of 2021.
Our overall segment profit for the quarter was $67 million or 2.1%, and included the $20 million charge for embedded derivatives in Energy Solutions and quarterly new scale expenses of $19 million.
Excluding these expenses and the effect of the embedded derivative, improves our total segment profit margin to 3.3%, in line with our guidance for the year.
Our ending cash balance was $2.7 billion, and includes the unutilized proceeds from the convertible offering and the completion of a P3 sale in North America.
Cash flow from operations was $77 million for the quarter, and we expect cash flow generation to be positive for the second half of this year.
We also completed the sale of AMECO North America in the second quarter and received cash proceeds of $71 million.
Our G&A expense was $31 million compared to $66 million last quarter.
At the end of the quarter, our backlog contained $1.2 billion in projects that are in a 0 margin or loss position.
Outside of the Gordie Howe project, we have just over $200 million in backlog remaining for projects in a loss position, virtually all of which will complete by the end of 2022.
Furthermore, looking at this slate of more recently awarded projects, project gross margin in all three segments is about 40 basis points higher than as sold gross margin, which shows there more disciplined approach to bidding is resulting in more predictable and profitable results.
Our previous adjusted earnings per share guidance of $0.50 to $0.80 per share was based on a share count of 140 million shares and thus, implied net income of $71 million to $113 million for 2021.
Based on the performance we see in the businesses and considering the additional shares related to the convertible preferred offering, we are raising our adjusted earnings per share guidance to a range of $0.60 to $0.80, which correlates to an adjusted net income of $94 million to $128 million for the full year.
We are also adjusting our segment level guidance for the second half of the year and expect segment margins to be approximately 3% to 4% in Energy Solutions, which excludes any fluctuation from the embedded foreign currency derivative, 3% to 4% in Urban Solutions, and 2.5% to 3% in Mission Solutions.
These margins also underpin Q3 and Q4 performance to support the updated diluted and adjusted earnings per share range of $0.60 to $0.80.
On our Strategy Day in January, we provided long-term 2024 earnings per share guidance of $3 to $3.50.
This range was provided using our 2020 share count of 140 million shares.
Adjusting for a diluted share count of 170 million shares in 2024, we are updating our long-term earnings per share guidance to a range of $2.50 to $2.90.
To reinforce, we are not changing our income assumptions, just adding to the denominator.

Summary:
So while we are seeing some near-term headwinds in 2021 with new word lumpiness, we have considerable opportunity to capture projects that are in the pipeline, and they're well suited for Fluor.
Based on the performance we see in the businesses and considering the additional shares related to the convertible preferred offering, we are raising our adjusted earnings per share guidance to a range of $0.60 to $0.80, which correlates to an adjusted net income of $94 million to $128 million for the full year.
These margins also underpin Q3 and Q4 performance to support the updated diluted and adjusted earnings per share range of $0.60 to $0.80.
To reinforce, we are not changing our income assumptions, just adding to the denominator.