Chipotle just can’t win.

The burrito chain posted better-than-expected earnings on Tuesday, sending shares up as much as 6.8 percent in aftermarket trading. However, the gains were erased when the company revealed that it had experienced a data breach.

Chipotle told investors during an earnings conference call that it had detected “unauthorized activity” on a network that supports payment processing for purchases made at Chipotle restaurants. The company said that it believes it has taken the proper steps to stop the activity.

Chipotle said that it is focused on transactions that occurred between March 24, 2017, and April 18, 2017.

Shares recovered Wednesday morning, rising 2.8 percent in premarket trading.

“This issue may bear watching, as — at times — similar issues have adversely affected same-store sales trends at some of those restaurant concepts unfortunate enough to go through this challenge,” Mark Kalinowski, a Nomura-Instinet analyst, wrote in a research note Wednesday.

The company’s same-store sales for the quarter grew 17.8 percent, up from the expected 14.9 percent that analysts had forecasted, according to Street Account.

Brian Bittner, an analyst at Oppenheimer, wrote in a research note Monday that the first quarter “represents peak comps,” as same-store sales were down almost 30 percent in the same quarter of 2016.

Chipotle reiterated its full-year 2017 outlook for same-store sales to grow in the high-single digits.

“Because the investigation is continuing, complete findings are not available,” John Hartung, Chipotle’s CFO, said during the call. Hartung said it was “too early to provide further details on the investigation.”

He added that the company has “implemented additional security enhancements” and declined to comment further.

In a statement from spokesman Chris Arnold, Chipotle warned customers to closely monitor their payment card statements and notify their bank if they see an unauthorized charge.

Chipotle plans to notify any affected customers when it gets “further clarity” about the timeframes and the restaurant locations that were affected.