fix window.onerror