Fix dynamic style setting so it works on chrome.