Switched some debug messages from 'error' to 'debug'. Also: implemented the prevention of the connection shutdown. Everything tested (the emulator works again).