fix interactive mode.