added Close button. fixed crashing when opening settings pane second time