toggle bug fix