Merge "function return early before setting the selection. Removed early return statement" into mainline-prod