Fix deleting listener resources.