fix client deactivation at shutdown
fix copy constructor