Greenlight Capital closed its short position on retailer JCPenney and sold its long holding in Microsoft in the second quarter, founder David Einhorn said in a letter to investors.

JCPenney was “our most profitable short of 2012,” and Greenlight covered its position when the board fired Chief Executive Officer Ron Johnson “before he could turn the company into a penney stock,” the hedge fund said.

Greenlight, which oversaw $8.8billion in assets at the start of the year, returned 1.2 percent in the quarter and 7.1 percent in the first half of 2013.

JCPenney, based in Plano, Texas, is trying to rebound from a 25 percent drop in sales last year under Johnson’s leadership.