Fixed crash when using names or abbrev. IDs in CLI

If you use an abbreviated ID, or a name, instead of the full ID, at the command line, then it crashes/asserts.

This pull request fixes that crash.

Signed-off-by: FellowTraveler <F3llowTraveler@gmail.com>