main.c fix for #2