Added handling for inline script errors as well