Corrected a small bug in the is_connected_handler.