fixed toggle order bug