fixed toggle initialization bug