small fix to db in spending