Another Fix to main2.c

Hopefully fixed segmentation error.