TORONTO - The Toronto stock market closed slightly higher Thursday with while commodity prices gave up ground amid economic data that reminded investors of the fragility of the U.S. recovery.

The S&P/TSX composite index was 17.84 points higher to 13,625.09 while the TSX Venture Exchange gained 10.11 points to 2,002.22. The Canadian dollar was stronger against the greenback, up a quarter of a US cent to 103.28 cents US.

Commodity stocks were weak and investors supported defensive sectors such as the utilities group, which was up 0.56 per cent. Canadian Utilities Group (TSX:CU) gained 53 cents to $58.15 and TransAlta Corp. (TSX:TA) gained 14 cents to $21.60.

Telecoms were also stronger with Rogers Communications (TSX:RCI.B) ahead 70 cents to $37.45. The industrials group also supported the Toronto market with Canadian National Railways (TSX:CNR) up $1.16 to $74.83.

The energy sector was down slightly as the June crude contract on the New York Mercantile Exchange declined $1.66 to US$98.44 a barrel. The drop followed a surge of more than $3 Wednesday as the latest inventory data from the U.S. showed signs of higher demand. It followed the release of data showing that a widely-watched gauge of future economic performance disappointed. The Conference Board's leading indicator fell 0.3 per cent during April, which was the first monthly decline since last June.

Meanwhile, the governing board of the International Energy Agency Thursday said it would like to see oil production ramped up amid growing signs that the rise in oil prices since September is affecting the economic recovery.

Canadian Natural Resources (TSX:CNQ) lost 16 cents to C$40.58.

Northern Alberta wildfires continued to impact oilsands production.

Cenovus Energy Inc. (TSX:CVE) has slowed production to 4,000 barrels per day at its Pelican Lake operations from the usual rate of 22,000 barrels per day as an important pipeline remains shut. A spokesman said that the blazes don't pose a direct threat to the facilities, about 90 kilometres northeast of Slave Lake. Its shares were down eight cents to $33.80.

Shell Canada Ltd. said Thursday it was pulling non-essential workers from its vast oilsands mining operations north of Fort McMurray, Alta., as wildfire smoke drifted toward the site.

Other companies affected by the fires include Canadian Natural Resources Ltd., Pengrowth Energy Corp. (TSX:PGF) and Penn West Exploration (TSX:PWT).

The base metals sector fell 0.37 per cent as metal prices weakened somewhat Thursday as the July copper contract on the Nymex dipped two cents to US$4.06 a pound. Quadra FNX Mining (TSX:QUX) lost 18 cents to $14.67.

The gold sector was slightly higher as the June gold contract in New York lost $3.40 to US$1,492.40 an ounce. Barrick Gold Corp. (TSX:ABX) added 16 cents to C$44.18.

Worries about slowing economic conditions have depressed commodity prices and pushed the TSX lower for the past three weeks.

"When you see the markets get edgy... it just puts more sellers into the markets than would normally be there and you get these types of retreats," said Gareth Watson, vice-president, Investment Management and Research at Richardson GMP Limited.

"The fact we have had a bit of a correction in (commodities) does not surprise me. And basically the market is trying to sort that all out and you're going to go through these ebbs and flows where the market is not going to get it right every time in terms of where the bottom is."

The TSX had surged 166 points on Wednesday, its third day of gains, amid a sharp rise in oil and metal prices while the minutes from the latest meeting of the U.S. Federal Reserve showed that the central bank is in no rush to raise interest rates.

Positive employment data helped send New York markets higher.

Dow Jones industrial average rose 45.14 points to 12,605.32. The Nasdaq composite index moved up 8.31 points to 2,823.31 while the S&P 500 index was up 2.92 points to 1,343.6.

The Labour Department reported that the number of people applying for unemployment benefits fell sharply for the second straight week, down 29,000 to a seasonally adjusted 409,000.

Other data showed a regional manufacturing survey came in much worse than expected.

The Federal Reserve Bank of Philadelphia's manufacturing index sank to 3.9 in May from 18.5 in April, well below expectations of an increase to 20.1.

On the corporate front, shares in business networking site LinkedIn Corp. soared during its opening trading on the NYSE with shares up $49.25 or 109.44 per cent to US$94.25.

And commodities trader Glencore International has priced its initial public offering at 530 pence a share, valuing the firm at US$59.2 billion. Glencore said the IPO is the largest ever on the premium listing segment of the London Stock Exchange. The stock started trading on the London Stock Exchange.

Air Canada shares dropped five cents to $2.34 after its pilots voted to reject a tentative agreement negotiated between their union and the country's largest airline.

Elsewhere, flight simulator and training company CAE Inc. (TSX:CAE) beat expectations as its fourth quarter net earnings increased 23 per cent to $49.7 million with $464.4 million of revenues. CAE shares were off 13 cents at $12.50.

RioCan Real Estate Investment Trust (TSX:REI.UN) reported that first-quarter profits rose to $347 million from $60 million a year earlier. Rental revenue increased to $237 million from $213 million and its units lost 21 cents to $25.59.