Fixed stats issue in main.cpp. Update Cmake file.