fix DB work