toggle state fix