Fix bug in Main.cpp