fixed a bug in ManageExpensesPage.qml which prevented app from loading
and also fixed some minor bugs in DB.js