removing referenceError event