fix bug of db not work