fix for a null pointer exception in the makeCmdLine