Update main.cpp

probably making things worse ref#924