Resetting form, window.onerror function moved