handle disconnecting controller