VE-1523: Fix a bug with expanded selection and add comments