fixed core dump when command not defined