Fix a problem with the listner attachtment