Fixed function call in listener