Fixes event listeners not being removed properly on rebind