cleanup the onclick event