diff --git a/borealis_ri/borealis_ri.module b/borealis_ri/borealis_ri.module
old mode 100644
new mode 100755
index 1e6a2b0..0c2f646
--- a/borealis_ri/borealis_ri.module
+++ b/borealis_ri/borealis_ri.module
@@ -393,7 +393,7 @@ function borealis_ri_image_default_styles() {
           }
           // Check to see if there's a "height" key, if so, we're gonna change it!
           // Simple oh/ow*nw=nh formula to calculate new height.
-          if(array_key_exists('height', $values['data'])) {
+          if(array_key_exists('height', $values['data']) and !empty($old_width)) {
             if(!empty($values['data']['height'])) {
               $old_height = $values['data']['height'];
               $new_height = $old_height / $old_width * $width;
