fixed bug with safari and chrome.