Fixed bug due to prerendering and unhandled chrome.tabs.onReplaced