Rename, bug fix

Change on click to named function to maintain corrent counter