Fixed the issue with events leaking out