fix interacitve main logic.

Signed-off-by: Samuel Deng <mr.dengshuoling@gmail.com>