init $is_connected correctly