[[ Bug 13079 ]] Fix various issues with select command
Merge pull request #988 from runrevali/bugfix-13079

[[ Bug 13079 ]] Fix various issues with select command