fixed bug with toggle