improved logic to set inital active pane