Fix crash if invalid command line is passed