Fix 'database is locked' error.