Minor fixes to import market data function