fix segfault on argument parsing