Bug fix and refactoring on the selection of parameters for each command