diff --git a/recaptcha.module b/recaptcha.module
index 9ac75eb..13a83c4 100644
--- a/recaptcha.module
+++ b/recaptcha.module
@@ -88,7 +88,7 @@ function recaptcha_captcha() {
         $recaptcha_secure_connection = variable_get('recaptcha_secure_connection', FALSE);
         $recaptcha_theme = variable_get('recaptcha_theme', 'red');
         $recaptcha_tabindex = variable_get('recaptcha_tabindex', NULL);
-        $recaptcha_public_key = variable_get('recaptcha_public_key', '');
+        $recaptcha_public_key = variable_get('recaptcha_public_key', FALSE);
         $recaptcha_form_value = NULL;
         $recaptcha_ajax_api = variable_get('recaptcha_ajax_api', FALSE);
 
@@ -179,10 +179,12 @@ function recaptcha_captcha() {
  */
 function recaptcha_captcha_validation($solution = NULL, $response = NULL) {
   global $user;
-  if ($response === 'reCAPTCHA' && !empty($_POST['recaptcha_challenge_field']) && !empty($_POST['recaptcha_response_field'])) {
+  $recaptcha_private_key = variable_get('recaptcha_private_key', FALSE);
+  $ip_address = ip_address();
+  if ($recaptcha_private_key && $ip_address && $response === 'reCAPTCHA' && !empty($_POST['recaptcha_challenge_field']) && !empty($_POST['recaptcha_response_field'])) {
     $resp = recaptcha_check_answer(
-      variable_get('recaptcha_private_key', ''),
-      ip_address(),
+      $recaptcha_private_key,
+      $ip_address,
       check_plain($_POST['recaptcha_challenge_field']),
       check_plain($_POST['recaptcha_response_field'])
     );
diff --git a/recaptcha_mailhide.module b/recaptcha_mailhide.module
index 042e68b..a872d4c 100644
--- a/recaptcha_mailhide.module
+++ b/recaptcha_mailhide.module
@@ -93,9 +93,14 @@ function _filter_recaptcha_mailhide_tips($filter, $format, $long = FALSE) {
 function _recaptcha_replace($match) {
   global $_recaptcha_mailhide_public_key, $_recaptcha_mailhide_private_key, $_recaptcha_mailhide_nokey_warn;
   // recaptchalib will die if we invoke without setting the keys. Fail gracefully in this case.
-  if (empty($_recaptcha_mailhide_public_key) || empty($_recaptcha_mailhide_private_key)) {
+  if (empty($_recaptcha_mailhide_public_key) || empty($_recaptcha_mailhide_private_key) || !function_exists('mcrypt_encrypt')) {
     if ($_recaptcha_mailhide_nokey_warn != TRUE) {
-      drupal_set_message(t('Addresses cannot be hidden because the administrator has not set the reCAPTCHA Mailhide keys.'), 'error');
+      if (!function_exists('mcrypt_encrypt')) {
+        drupal_set_message(t('Addresses cannot be hidden because Mcrypt is not installed.'), 'error');
+      }
+      else {
+        drupal_set_message(t('Addresses cannot be hidden because the administrator has not set the reCAPTCHA Mailhide keys.'), 'error');
+      }
       $_recaptcha_mailhide_nokey_warn = TRUE;
     }
     $email = $match[2];
