fix infinite loop in get_market_orders