Fixed the disconnect handler.