Increased robustness of getSelectedGraphic()