Fix toggle pane bug