Fixed segfault when run with -c