Temporary workaround for failure when database is locked