Target shoppers came through with strong sales for the discount retailer during the fourth quarter. However, earnings at the company dropped as it is preparing to end its business across Canada.

Target posted a loss of $2.6 billion during the quarter ending January 31, equal to $4.10 per share from the impact of shuttering its Canadian stores. That was compared to a profit of $520 million during the same quarter in 2013.

Adjusted earnings, excluding special costs from its discontinued operations, reached $1.50 per share, which beat expectations of $1.46 on Wall Street.

The discount retailer announced last month that it was closing all 133 stores it has in Canada after opening there in 2013.

The company lost over $2 billion during its time in Canada as it mismanaged its expansion and it failed to entice shoppers from Canada with shelves often half empty and with inconsistent pricing.

Target shares were up slightly in early Wednesday trading. Sales were 4.1% higher to end the quarter at $2.18 billion compared to $20.9 billion for the same quarter one year ago, as traffic in stores increased and Target recorded more sales through digital channels.

In-store traffic was up by 3.2%. Sales at same-stores, which excludes any openings or closings, was higher by 3.8%. Sales from its digital channels were 0.9% to comparable sales.

Target had invested significantly in its digital apps, experiences and seamless shopping between online and brick and mortar stores, such as being able to purchased online but pick up the product in the store.

Target announced earlier in the week that it was giving free shipping to all orders that were $25 and higher year round. During the period of holiday shopping, free shipping was available for all orders.

Target reported that sales for the full year were up 1.9% or $72.6 billion compared to last year’s of $71.3 billion. The company said that expenses totaling $145 million had been incurred last year that were related to the breach of data that took place during the 2013 fourth quarter. The total cost of $191 million offset by insurance receivables of $46 million. The primary cost was legal fees.