Diconnect on tab/window close and removed debug prints