Fix disconnect in emulator