Fix the bug when return db null #47