Improved disconnection detection