Update main.c

few buf fixes fix