Add terminate in the shell to fix the exit issue