Register event listener immediately