Image source: Planet Fitness.

Investors showed modest optimism about the stock market on Tuesday, and the Dow and S&P 500 climbed for the second straight day. Investors are still nervous about Friday's vote among British citizens on whether their country should remain a part of the European Union, but they seem to be getting more comfortable with the prospect that the referendum could end up supporting the current relationship between the U.K. and the continent. Even though Fed chair Janet Yellen pointed to some possible negative results if the U.K. were to leave the EU, the markets didn't suffer a lasting hit, and major market benchmarks finished the day with gains of around 0.1% to 0.3%. That didn't stop some stocks from falling sharply, and Impax Laboratories (IPXL), Werner Enterprises (WERN -0.37%), and Planet Fitness (PLNT -1.18%) were among the weakest stocks in the market on Tuesday.

Impax Labs fell 11% after announcing a deal to purchase a portfolio of generic products from some of its competitors. The agreement involves Teva Pharmaceutical Industries and Allergan and covers 15 currently marketed generics. The $586 million deal also includes returning the rights to Impax's generic equivalent to ADHD treatment Concerta, along with several products that have either not launched or still need FDA approval. CEO Fred Wilkinson argued that the deal makes sense with Impax's broader goals, saying that the "acquisition of these currently marketed and pipeline products fits with our strategic priorities of maximizing our generic platform, optimizing R&D, and accelerating business development to create long-term growth." Nevertheless, investors seem to believe that Impax paid too much for the deal, given that it was in a strong position to benefit from the requirement that Teva and Allergan divest certain products in order to allow Teva to buy out Allergan's generic business.

Werner Enterprises dropped 10% in the wake of an earnings warning issued Monday afternoon. The trucking company said that it expects earnings for the second quarter to come in between $0.21 to $0.25 per share, which is less than the $0.39 per share that investors were expecting. Werner blamed the bottom-line shortfall on sluggish freight-market conditions, driver pay increases, and a soft market for used trucks. Although Werner anticipates taking further steps to contain costs, investors are worried that the apparent slowdown in shipping activity could be a sign of more extensive weakness in the U.S. economy. Given how much global investors have relied on U.S. strength to remain optimistic, any break in that confidence could have impacts that go well beyond Werner stock.

Finally, Planet Fitness lost 6%. The health-club chain is seeing an exodus among its major shareholders, announcing a secondary offering of 10 million shares of stock. The company isn't selling any of its own shares, and so the proceeds will go solely to those investors who are using the offering as their exit strategy. Pricing for the deal hasn't yet been announced, but Planet Fitness shareholders expect the usual decline as sellers try to dump a substantial amount of stock onto the market all at one time. With more than 8.3 million members and almost 1,200 locations, Planet Fitness hopes that its share price will be able to bulk back up after today's setback.