finally fixing the broken scope error inside click handler cleanup