fix client disconnected error