restored toggle listener