ErrorEvent fix