fixing Dont have database lock error