Fix bug of db script