Fixed button clicked function