Stocks on Tuesday worked to rebound from Monday's losses, but failed to fully recover, with both the Dow Jones Industrial Average and the S&P 500 ended the session in the red. However, the Nasdaq rose over 0.2% by the end of the trading session as investors bought the dip in major tech stocks like Apple (AAPL  ).

Here's how the market settled on Tuesday:

S&P 500 Index (SPY  ): -0.08% or -3.54 points to 4,354.19

Dow Jones Industrial Average (DIA  ): -0.15% or -50.63 points to 33,919.84

Nasdaq Composite Index (QQQ  ): +0.22% or +32.49 points to 14,746.40

Biden says U.S. will focus on other global challenges after Afghanistan war:

President Joe Biden defended his decision to end the United States' war in Afghanistan in his first address to the United Nations on Tuesday, saying that the move sets up the U.S. to focus on other global challenges.

"As the United States turns our focus to the priorities and the regions like the Indo-Pacific that are most consequential today and tomorrow we'll do so with our allies and partners through the cooperation of multilateral institutions like the United nations to amplify our collective strength and speed," Biden said in his address during the gathering of the 76th United Nations General Assembly.

"Instead of continuing to fight the wars of the past, we are fixing our eyes and devoting our resources to challenges that hold the keys to our collective future," Biden added.

Google to purchase NYC office building for $2.1 billion:

Google (GOOGL  ) announced plans to buy a New York City office building for $2.1 billion on Tuesday, even as most of the tech giant's workforce continues to work remotely.

The office building's purchase is the most expensive for any single U.S. office building since the start of the pandemic, according to The Wall Street Journal, citing Real Capital Analytics.

Google already leases the St. John's Terminal building in Manhattan, with Chief Financial Officer Ruth Porat stating that by exercising its option to purchase the building, the office will "serve as the anchor of our new Hudson Square campus."

"As Google moves toward a more flexible hybrid approach to work, coming together in person to collaborate and build community will remain an important part of our future," Porat said in a blog post. "Our decision to exercise our option to purchase St. john's Terminal further builds upon our existing plans to invest more than $250 million this year in our New York campus presence."

Housing starts top expectations in August:

U.S. housing starts rose by 3.9% to a seasonally adjusted annual rate of 1.615 million units in August, according to new data by the U.S. Commerce Department published Tuesday. The results topped analysts' expectations of 1.55 million units, according to Bloomberg consensus. July starts were upwardly revised to 1.554 million units.

Meanwhile, U.S. building permits in August rose 6% above an upwardly revised 1.63 million units in July to 1.728 million units.

Here's how market benchmarks started trading soon after open:

S&P 500 Index: +0.50% or +21.73 points to 4,379.46

Dow Jones Industrial Average: +0.52% or +175.37 points to 34,145.84

Nasdaq Composite Index: +0.52% or +76.54 points to 14,790.44