Fix toggle of panels