Fixed crash when using names or abbrev. IDs in CLI

Signed-off-by: FellowTraveler <F3llowTraveler@gmail.com>