Fix check_url method