Update main.cpp

Removed line closing the database, which was causing the wallet to crash.