fix bug on mirror-repl idle