Fixed error caused by checking toggle with Event