fix for default selected and undefined