updating title, fix onclick event