Fix JS errors in chrome.