fix db part1