Fix display of "undefined" when no main selection is done.