Added checking for listener