Fix crash where client is not re-initialized after shutting down