Fixes: the application hangs on close attempt if the sender has not yet been initialized

Also, removes the flood of "Unable to connect" messages, now they are displayed only once