fix case when listeners removed during emit