Shares of Facebook (FB) dropped again Tuesday after reports of harvested user data from controversial political data analytics firm Cambridge Analytica. Facebook CEO and founder Mark Zuckerberg still managed to avoid a bigger financial hit by selling a portion of his shares before the drop, according to reports.

According to MarketWatch, Zuckerberg sold nearly 5 million shares of company stock since the start of 2018 and saved about $40 million ahead of this week's selloff.

Facebook’s price of shares on Monday dropped by more than 6 percent. Shares of Facebook closed at $185.09 on Friday before plummeting to as low as $170.06 on Monday. Shares closed at $172.56 on Monday and dropped 4 percent Tuesday on heavy volume.

At the closing bell Tuesday, Facebook's price of shares were at $168.15. The company has lost more than $42 billion in market value.

Zuckerberg still took a hit to his net worth because of the stock’s steady decline. Monday’s downswing wiped out about $5 billion in personal wealth for the Facebook founder and chief executive.

Aside from the $40 million he saved, Zuckerberg has made about $900 million since the start of the year.

A spokesperson for Facebook said the stock sale wasn’t related to news that Cambridge Analytica used Facebook data to build political profiles and target individuals with political advertisements. Cambridge Analytica has come under fired after a secret video emerged Tuesday of its CEO explaining the role the firm played in Trump's presidential campaign.

According to the spokesperson, the sales were intended to fund the Chan-Zuckerberg Initiative, a philanthropic investment group set up by Zuckerberg and his wife, Priscilla Chan, in 2015.

Last September, an SEC filing showed that Zuckerberg intends to sell at least $6 billion in Facebook stock over the course of the next 18 months in order to fund the charitable organization’s many efforts.