Fixed issues with event reregistering