BlackBerry shares fell as much as 12 percent after the company said its revenue fell short of analyst expectations. Revenue fell 43 percent to $244 million, the company said, below Wall Street’s consensus estimate of $264 million.

Despite the revenue decline, BlackBerry managed to post a net profit of 2 cents a share, above the break-even forecast of analysts.

CEO John Chen has been trying to engineer a turnaround at BlackBerry by moving away from its long-declining handset business and toward a new business model centered on enterprise software. Revenue from handsets fell 76 percent to $37 million, accounting for 15 percent of revenue. Software and services, meanwhile, rose 2 percent to $169 million, equal to 69 percent of revenue.

BlackBerry’s software has focused on two areas, both facing rising competition from deep-pocketed rivals: software that helps companies track and secure mobile devices and its QNX software for connected and autonomous cars. Earlier this month, Toyota dropped QNX from its cars in favor of an open source alternative, although BlackBerry discounted the impact of Toyota’s move. The company’s mobile security wares also compete against similar offerings from IBM, VMWare, and others.

Chen noted in a statement that Qualcomm and Nvidia adopted Blackberry technology for their automotive platforms last quarter and underscored that the company’s guidance for the full fiscal year remains unchanged, with software and services rising between 10 percent and 15 percent. “Our financial foundation is solid,” Chen said.

Even after today’s decline, BlackBerry’s stock is up 43 percent in 2017, compared with a 16 percent rise in the Nasdaq Composite, amid optimism that Chen was turning BlackBerry around. The degree of the selloff today suggests that some investors are rethinking that optimism, given competitive pressures the company faces.