Fixing event removal bug