Fixing event error