Fix crash when empty or whitespace cmd is entered