diff --git a/cloudfiles-cdn.php b/cloudfiles-cdn.php
index 58255e17271a85fc38d5db7970940beebad8de74..e08ccdbb84eb2dfa7e1155f6ae5cd7f0aa114c36 100644
--- a/cloudfiles-cdn.php
+++ b/cloudfiles-cdn.php
@@ -25,6 +25,11 @@ class CloudfilesCdn {
 	 */
 	public static function get_setting($setting) {
 		$settings = get_option(self::OPTION_GENERAL);
+		if(!$settings || !is_array($settings)) {
+			$settings = array(
+				'file_extensions' => 'bmp|bz2|css|gif|ico|gz|jpg|jpeg|js|mp3|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|zip'
+			);
+		}
 		return (isset($settings[$setting])) ? $settings[$setting] : false;
 	}
 
@@ -372,7 +377,7 @@ class CDN_Rewrite {
 	private $cdn_root_url;
 
 	public function __construct() {
-		$this->file_extensions = 'bmp|bz2|css|gif|ico|gz|jpg|jpeg|js|mp3|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|zip';
+		$this->file_extensions = CloudfilesCdn::get_setting('file_extensions');
 		$this->cdn_root_url = untrailingslashit(CloudfilesCdn::get_setting('root_url'));
 	}