Making sure listener is set before calling broadcast.