fix reload problem - unload_module was not setting connected to 0 (issue #5498)