Fix issue with (un)binding events