Fixed listeners to use static vars for multiple instances.