Update main.cpp

Segmentation fault anyone? ;)