fixed small startup crash in main.c