Fixed a bug with the market tree being duplicated.