Fix bug in main.cpp that may cause program crash.
Update README.md.