diff --git a/sites/all/modules/html5_tools/html5_tools.module b/sites/all/modules/html5_tools/html5_tools.module
index ac4c643..e100a41 100644
--- a/sites/all/modules/html5_tools/html5_tools.module
+++ b/sites/all/modules/html5_tools/html5_tools.module
@@ -160,7 +160,7 @@ function html5_tools_field_widget_error($element, $error, $form, &$form_state) {
  */
 function html5_tools_preprocess_html_tag(&$variables) {
   // Cleanup markup by removing obsolete attributes.
-  if (variable_get('html5_tools_override_style_tags', 1) && ($variables['element']['#tag'] == 'style' || $variables['element']['#tag'] == 'link')) {
+  if (variable_get('html5_tools_override_style_tags', 1) && ($variables['element']['#tag'] == 'style' || ($variables['element']['#tag'] == 'link' && $variables['element']['#attributes']['rel'] == 'stylesheet'))) {
     unset($variables['element']['#attributes']['type']);
   }
   if (variable_get('html5_tools_override_script_tags', 1) && $variables['element']['#tag'] == 'script') {
