check to make sure listener exists before removing