Fixed crash when trying to initialize database

Crash caused by g.accounts not being set.