Added onChange for the checkbutton