fixed xomparison problem in main.c