Allow to close modules in solo mode
(cherry picked from commit 26e08dfd0f2b222052348c544b5a35a6ab72956e)