fix force close by disconnecting from repl