Update main.cpp

Fix key bug