fix javascript toggle