Error checking for dependencies did not handle all cases.