Fixed main.cpp for production