solving listeners bug