Hopefully fix potential SQLite database lock errors.