Better check_connection