fixed db lock error