fixed memory button click event listener