Fixed mistakes from merge and explicitly set multiselect based on flag