Just when it seemed lumber prices couldn’t surge any higher, problems for Canada’s railways mean the rally could continue.

A shortage of rail capacity cost Vancouver-based lumber producer Canfor Corp. C$20 million ($15.6 million) in the first quarter and led to a pile-up of inventories that were left sitting at the company’s sawmills and pulp mills, Chief Executive Officer Don Kayne said Thursday.

The rail crunch is adding to the cost of lumber at a time when futures in Chicago are already trading at record highs. Prices have soared amid rising demand from the U.S. housing market and pressure from President Donald Trump’s tariffs on Canadian shipments.

“All the duties and now transportation, there’s no question that both had and are having an impact,” Kayne said Thursday during his company’s first quarter earnings call. “Particularly transportation since October is having an impact.”

Harsh winter conditions and swelling demand from multiple Canadian industries, including grain and crude, spurred a shortage of rail cars. Lumber futures have gained about 25 percent this year, among the best-performing commodities tracked by Bloomberg.

The rail woes were echoed by other companies. West Fraser Timber Co. said Thursday transportation disruptions resulted in a substantial increase in inventories and the company is uncertain when the backlog of shipments will be cleared. International Paper Co. had some inventory it was unable to get out of its pulp mill in Grand Prairie, Alberta, in the first quarter as demand improved faster than boxcar capacity, Chief Executive Officer Mark Sutton said in a telephone interview Thursday.