fix bug with selection in cli