fixed legacy mode bug