Update main.cpp

Some bugs detect