fix bug about db