fixed minor issues with main.c