fixed layout issues and autoreconnect after server restart