Fix getSelectedId method
Fix command method: when selector with no results passes there is no more exception.