[Fix] Segfault in pilot.c