solved toggle bug