Updated ws handlers to be conform with latest chrome.