fix DB bug