fixed the initial toggle state