Improved listener registration.