Fix issue with (un)delegation event