Prevent same pane from opening twice