Fixes nag bug when no panel is selected.