Added a .timeout to deal with database locking.