Small fix for DB refactory

Small pull request from SegFault Hunt.