Changed scope in the click listener