Fix event listener in sample.