Fix issue #1202
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index ce5e030..8ffd93a 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -213,6 +213,7 @@
 		$dec = base64_decode($string);
 		if (($dec = $this->mcrypt_decode($dec, $key)) === FALSE)
 		{
+			$this->set_mode($current_mode);
 			return FALSE;
 		}