Handlers for sudden disconnection and ejection
Bugfix from previous commit