fix check if cuda is available.