diff --git a/cas.admin.inc b/cas.admin.inc
index 4c209a2..81d75bb 100644
--- a/cas.admin.inc
+++ b/cas.admin.inc
@@ -15,27 +15,14 @@ function cas_admin_settings() {
     '#title' => t('Library (phpCAS)'),
     '#collapsible' => TRUE,
   );
-  if (module_exists('libraries')) {
-    // If Libraries API is enabled, print an information item.
-    $form['library']['cas_library_dir'] = array(
-      '#type' => 'item',
-      '#title' => t('Library directory'),
-      '#value' => t('Using <a href="@url">Libraries API</a>.', array('@url' => 'http://drupal.org/project/libraries')),
-      '#description' => t('Please ensure phpCAS is installed in a location compatible with Libraries API. For example, install phpCAS so that <em>sites/all/libraries/CAS/CAS.php</em> exists. See README.txt for more information.'),
-      '#after_build' => array('cas_library_version_check'),
-    );
-  }
-  else {
-    // If Libraries API is not installed, display path settings.
-    $form['library']['cas_library_dir'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Library directory'),
-      '#default_value' => variable_get('cas_library_dir', 'CAS'),
-      '#description' => t('Specify the path to the directory the CAS.php file resides in. Leave blank to load cas from your phpinclude path.'),
-      '#after_build' => array('cas_library_version_check'),
-    );
-  }
 
+  $form['library']['cas_library_dir'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Library directory'),
+    '#default_value' => variable_get('cas_library_dir', 'CAS'),
+    '#description' => t('Specify the path to the directory the CAS.php file resides in. Leave blank to load cas from your phpinclude path.'),
+    '#after_build' => array('cas_library_version_check'),
+  );
 
   $form['server'] = array(
     '#type' => 'fieldset',
@@ -349,9 +336,8 @@ function cas_admin_settings() {
  *   The modified form element containing the "library" fieldset.
  */
 function cas_library_version_check($element, &$form_state) {
-  $path = module_exists('libraries') ? NULL : $element['#value'];
-  // Suppress errors if phpCAS cannot be loaded.
-  if ($version = @cas_phpcas_load($path)) {
+  // Check if the phpCAS library can be loaded.
+  if ($version = cas_phpcas_load()) {
     $element['#suffix'] = '<div class="ok messages">' . t('phpCAS version %version successfully loaded.', array('%version' => $version)) . '</div>';
   }
   else {
diff --git a/cas.module b/cas.module
index 3b84d97..030806b 100644
--- a/cas.module
+++ b/cas.module
@@ -195,28 +195,35 @@ function cas_login_check($force_authentication = TRUE) {
  *   The phpCAS version if the phpCAS was successfully loaded, FALSE otherwise.
  */
 function cas_phpcas_load($path = NULL) {
-  if (!isset($path)) {
+  if (empty($path)) {
+    if (empty($path)) {
+      $path = variable_get('cas_library_dir', 'CAS');
+    }
+
     if (module_exists('libraries')) {
       $path = libraries_get_path('CAS');
     }
-    else {
-      $path = variable_get('cas_library_dir', 'CAS');
-    }
   }
 
   // Build the name of the file to load.
-  if ($path != '') {
+  if (!empty($path)) {
+    // Make sure there is a slash at the end of the path.
     $path = rtrim($path, '/') . '/';
-  }
-  $filename = $path . 'CAS.php';
 
-  include_once($filename);
+    $filename = $path . 'CAS.php';
 
-  if (!defined('PHPCAS_VERSION') || !class_exists('phpCAS')) {
-    // The file could not be loaded successfully.
-    return FALSE;
+    // Verify the file exists
+    if (file_exists($filename)) {
+      include_once($filename);
+
+      // Make sure we can get the cas variables.
+      if (defined('PHPCAS_VERSION') && class_exists('phpCAS')) {
+        return PHPCAS_VERSION;
+      }
+    }
   }
-  return PHPCAS_VERSION;
+
+  return FALSE;
 }
 
 /**
