Fix duplicating event listener issue.