Small fix for DB handler.
Merge pull request #407 from LipuFei/db-handler-fix

Small fix for DB handler.