Fixed an error in the Listener.