toggle related bug fix