diff --git a/services/s3.inc b/services/s3.inc
index b3c09bb..d0cf49a 100644
--- a/services/s3.inc
+++ b/services/s3.inc
@@ -943,7 +943,7 @@ class StorageS3 extends StorageContainer implements StorageContainerInterface {
       }
     }
     else {
-      if (https && strpos($this->settings['bucket'], '.') !== false) {
+      if ($https && strpos($this->settings['bucket'], '.') !== false) {
         $base_url .= 's3.amazonaws.com/' . $this->settings['bucket'];
       }
       else {
